@echo off

cd .\ChatAppServer
dotnet publish

cd ..\..\..\

if not exist .\AppServer\Logic md .\AppServer\Logic
if not exist .\AppServer\Logic\Log md .\AppServer\Logic\Log

xcopy .\ChatAppServer\bin\Debug\net8.0\*.* ".\AppServer\Logic" /s /e /c /y /h /r


cd .\WebServer
dotnet publish

cd ..\..\

if not exist .\AppServer\Master md .\AppServer\Master
if not exist .\AppServer\Master\Log md .\AppServer\Master\Log

xcopy .\WebServer\bin\Debug\net8.0\Publish\*.* ".\AppServer\Master" /s /e /c /y /h /r


if not exist .\AppServer\Data md .\AppServer\Data

xcopy .\Data\*.* ".\AppServer\Data" /s /e /c /y /h /r


if not exist .\AppServer\Config md .\AppServer\Config

xcopy .\Config\*.* ".\AppServer\Config" /s /e /c /y /h /r

pause